package com.tarena.lbs.coupon.enums;

import com.tarena.lbs.base.protocol.enums.ErrorCodeSupport;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum StockResultEnum implements ErrorCodeSupport {

    SUCCESS("0", "success"),
    FAILED("500", "服务错误，请稍后"),

    /**
     * 业务异常，code 从10001开始
     */
    DATA_NOT_FIND("10001", "参数错误"),
    DATE_ERROR("10002", "日期参数错误"),
    ACTIVITY_NOT_FIND("20001", "活动不存在"),
    COUPON_NOT_FIND("20002", "优惠券不存在"),
    COUPON_EXPIRED("20003", "优惠券已过期"),
    COUPON_NOT_START("20004", "优惠券活动未开始"),
    COUPON_SOLD_OUT("20005", "优惠券已抢光"),
    USER_ALREADY_RECEIVED("20006", "您已领取过该优惠券"),
    USER_RECEIVE_LIMIT("20007", "您已达到领取上限"),
    PARAM_NULL("20008", "参数不能为空"),
    USER_ID_NULL("20009", "用户ID不能为空"),
    COUPON_ID_NULL("20010", "优惠券ID不能为空"),
    SYSTEM_ERROR("20011", "系统异常，请稍后重试");

    private String code;
    private String message;
}